<?php
# 换汇成本计算公式
# Currency exchange cost
# currency_exchange_cost

class currency_exchange_cost{
	private $amount = 0;
	private $tax = 0.17;
	private $drawback = 0.17;
	private $fob = 0;
	# 
	# 设置 计税金额（不含税）
	# 
	public setAamount($_amount){
		$amount = $_amount;
	}
	# 
	# 设置 税率
	# 
	public setTax($_tax){
		$tax = $_tax;
	}
	# 
	# 设置 退税率
	# 
	public setDrawback($_drawback){
		$drawback = $_drawback;
	}
	# 
	# 设置 FOB美金离岸价
	# 
	public setFob($_fob){
		$fob = $_fob;
	}
	# 
	# 获取 计税金额（不含税）
	# 
	public getAamount(){
		return $amount;
	}
	# 获取 税率
	public getTax($_tax){
		return $tax;
	}
	# 
	# 获取 退税率
	# 
	public getDrawback(){
		return $drawback;
	}
	# 
	# 获取 FOB美金离岸价
	# 
	public getFob(){
		return $fob;
	}
	# 
	# 输出结果
	# 
	public output(){
		return ($amount * (1 + ($tax - $drawback))) / $fob;
	}
}
?>